namespace graver
{
    public class ParenthesizedExpressionSyntax : ExpressionSyntaxNode
    {
        public SyntaxToken OpenParenthesisToken { get; }
        public ExpressionSyntaxNode Expression { get; }

        public SyntaxToken CloseParenthesisToken { get; }

        public ParenthesizedExpressionSyntax(SyntaxToken openParenthesisToken, ExpressionSyntaxNode expression, SyntaxToken closeParenthesisToken)
        {
            OpenParenthesisToken = openParenthesisToken;
            Expression = expression;
            CloseParenthesisToken = closeParenthesisToken;

        }

        public override SyntaxKind Kind => SyntaxKind.ParenthesizeExpression;

        public override IEnumerable<SyntaxNode> GetChildren()
        {
            yield return OpenParenthesisToken;
            yield return Expression;
            yield return CloseParenthesisToken;
        }

    }

}

